import java.util.Scanner;

public class Application {
    public static void main(String[] args) {
        ProductArray productArray = new ProductArray(1000);
        Scanner ch = new Scanner(System.in);
        int choice=-1;
        while (choice!=0){
            System.out.println("=============");
            System.out.println("[1] 添加信息");
            System.out.println("[2] 显示信息");
            System.out.println("[3] 查找信息");
            System.out.println("[4] 修改信息");
            System.out.println("[5] 删除信息");
            System.out.println("[0] 退出");
            System.out.println("=============");
            System.out.println("请输入你想要的操作：");
            int input=ch.nextInt();
            switch (input){
                case 1:
                    productArray.add();
                    break;
                case 2:
                    productArray.findproduct();
                    break;
                case 3:
                    productArray.update();
                    break;
                case 4:
                    productArray.edit();
                    break;
                case 5:
                    productArray.delete();
                    break;
                case 0:
                    choice=0;
                    break;
            }

        }
        }

}
